package com.guoxin.factory.factorymethod.pizzastore.order;

import com.guoxin.factory.TypeUtils;
import com.guoxin.factory.factorymethod.pizzastore.pizza.Pizza;

/**
 * 
 * @author Administrator
 *
 */
public abstract class OrderPizza {

	public abstract Pizza createPizza(String type);

	public OrderPizza() {
		do {
			Pizza pizza;
			String type = TypeUtils.getType();
			pizza = createPizza(type);
			if(pizza != null){
				pizza.show();
			}else{
				System.out.println("订购失败~~~");
				break;
			}
		} while (true);
	}

}
